<html>

    <head>
        <title>Iris FTP - Script syntax</title>
    </head>

    <body>
        <h1>Iris FTP - Script Syntax</h1>

        <p>The script files are parsed one line at a time, from top to bottom.
        The IrisFTP parser supports all of the commands available when running
        the program in interactive mode. There are a few additions though:
        </p>
        <h3>if tests</h3>
        <p>Syntax:</p>
<pre>
if (statement)
&lt;ordinary commands&gt;
endif
</pre>
        <p>The 'statement' can be on any of the following form:</p>
        <dl>
            <dt>True/False</dt>
            <dd>Simply verify the if test as true or false</dd>
            <dt>-f &lt;file&gt;</dt>
            <dd>Return true if &lt;file&gt; exists</dd>
            <dt>-smin &lt;file&gt; &lt;size&gt;</dt>
            <dd>Return true if &lt;file&gt; is bigger than &lt;size&gt; bytes</dd>
            <dt>-smax &lt;file&gt; &lt;size&gt;</dt>
            <dd>Return true if &lt;file&gt; is smaller than &lt;size&gt; bytes</dd>
            <dt>-old &lt;local&gt; &lt;remote&gt;</dt>
            <dd>Return true if &lt;local&gt; is older than &lt;remote&gt;</dd>
            <dt>-new &lt;local&gt; &lt;remote&gt;</dt>
            <dd>Return true if &lt;local&gt; is newer than &lt;remote&gt;</dd>
            <dt>not</dt>
            <dd>Prefixing any of the above statments with not negates the result
            (i.e. '<code>not -smax localfile remotefile</code>')</dd>
        </dl>
        <p>Note that if tests can be nested.</p>

        <h3>print statement</h3>
        <p>Outputs anything following <code>print</code> to stdout</p>
        <code>print this text will be printed to stdout</code>

        <h3>exit command</h3>
        <p>Aborts the script</p>
        <code>exit</code>

        <h3>Comments</h3>
        <p>Lines starting with <code>#</code> are treated as comments, and
        therefore ignored when parsing the file</p>
        <code># Commenting is said to be a good thing</code>
        

    <body>

</html>
